import toolAxios from "@/tool/http/tool-axios";
import { store } from "@/stores/index.js";

const ToolUpload = {
  async upload(files) {
    const formData = new FormData();
    files.forEach((element) => {
      formData.append("files", element);
    });
    formData.append("channelBusinessId", "402809817fbc4f3d017fbcbed26a001d");
    formData.append("bucketName", "app-bucket");

    let res = await toolAxios.postFrom(
      store.app.baseApi + "/public/storage/stores",
      formData
    );

    return res;
  },
};

export default ToolUpload;
